import _Fetch from '@/server/Fetch'
import { API_POST_COURSE_INFO } from '@/api/college/get_course_detail_info'
import { API_POST_COURSE_LOWER } from '@/api/college/get_course_detail_lower'
import { API_POST_MY_TOGGLE_LICK } from '@/api/user/getMyCollect'
import { API_POST_PLAY_COURSE } from '@/api/college/get_play_course'
export async function course_detail_api(id: number) {
  return await _Fetch(API_POST_COURSE_INFO, {
    courseNameId: id,
  })
}
export async function course_lower_api(id: number, type: number, pageSize: number, pageNum: number) {
  return await _Fetch(API_POST_COURSE_LOWER, {
    courseNameId: id,
    type,
    pageSize,
    pageNum,
  })
}
export async function toggle_lick_api(id: number, type: number) {
  return await _Fetch(API_POST_MY_TOGGLE_LICK, {
    id,
    type,
  })
}

// 课程播放接口
export async function playCourseApi(courseId: number) {
  return await _Fetch(API_POST_PLAY_COURSE, {
    courseId,
  })
}
